package Zuoye;

import java.util.Scanner;

public class Lianxi3 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        for (int i = 1; i <= 100; i++) {
            System.out.print("请输入一个1-7之间的数字，输入0退出程序:");
            int a=input.nextInt();
            switch(a){
                case 1:
                    System.out.println("星期一");
                    continue;
                case 2:
                    System.out.println("星期二");
                    continue;
                case 3:
                    System.out.println("星期三");
                    continue;
                case 4:
                    System.out.println("星期四");
                    continue;
                case 5:
                    System.out.println("星期五");
                    continue;
                case 6:
                    System.out.println("星期六");
                    continue;
                case 7:
                    System.out.println("星期日");
                    continue;
                case 0:
                    System.out.println("程序结束");
                    break;
                default:
                    System.out.println("您输入的数字不合格，只能输入1-7范围的数字！");
                    System.out.println();
                    break;
            }
        }
        //从键盘输入一个整数，当输入1~7时，输出“星期一”~“星期日”
        //输入其他数字时，提示用户重新输入
    }
}
